function p1() {
  return new Promise(resolve => {
    setTimeout(() => {
      resolve("p1")
    }, 200);
  })
}
function p2() {
  return new Promise(resolve => {
    resolve("p2")
  })
}

p2().finally(() => {
  console.log("finally");
  return 1
}).then(res => {
  console.log(res);
}, err => {
  console.log(err);
})